package com.learn.Controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/03/14
 * @description 测试路径匹配的控制器
 */
@RestController
public class PathController {
//    @GetMapping("/{path:[a-z]+}/a?/**/*.do")
    @GetMapping("/{path:[a-z]+}/a?/**")
    public String testPath(HttpServletRequest request, @PathVariable("path") String path) {
        return request.getRequestURI() + ": " + path;
    }
}
